home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-09-01 | 1.2 KB | 49 lines | [TEXT/KAHL] |
- //
- // "XcShell" Skeletal XCMD/XFCN version identification function
- //
- // Copyright ©1991 Mark M. Owen -- All rights reserved
- //
- #include <string.h>
-
- #include "SysEnvirons.h"
-
- #include "XCMDutils.h"
- #include "XCMDversion.h"
-
- //////////////////////////////////////////////////////////////
- // set the definition below to your version information //
- //////////////////////////////////////////////////////////////
- #define VERSION "\pXC v0.0 Copyright ©1991 Mark M. Owen -- All Rights Reserved"
-
-
- void XCMDVersion(void)
- {
- char S[512];
- char *ps = S+1;
- char V[512] = VERSION;
- long n;
-
- V[V[0]+1] = 0x00;
- *ps = 0x00;
- AppendNum( IsColorGDevice(), ps, "," );
- AppendNum( HasColorQD(), ps, "," );
- AppendNum( Has32BitQD(), ps, "," );
- AppendNum( HasFPU(), ps, "," );
- AppendNum( GDevicePixelBits(), ps, "," );
- AppendNum( MachineType(), ps, "," );
- n = (short)SystemVersion();
- AppendNum( n>>8, ps, "." );
- AppendNum( n-((n>>8)<<8), ps, "," );
- AppendNum( Processor(), ps, "," );
- AppendNum( KeyBoardType(), ps, " " );
- AppendCStr( ps, &V[1] );
- #ifdef _MC68881_
- AppendCStr( ps, ". 881" ); // this is FPU optimized code
- #else
- AppendCStr( ps, "." ); // this is Generic Mac Code
- #endif _MC68881_
- S[0] = strlen( ps );
- SetReturnValue( S );
- }
-
-